$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
require 'spiceinit'

module LCD
  modspiced :readers => {:core_image => "Hardware Accelerated"}, 
            :accessors => {:main_display => true, :mirror => "off", :online => true},
            :track_spices => true

  modspiced :accessors => {:resolution => "1440x960", :colors => "Millions", :brightness => 50, 
            :auto_adjust => true, :show_in_menu => true, :refresh_rate => "n/a"},
            :track_spices => true
end

p LCD.core_image
# => "Hardware Accelerated"
p LCD.main_display
# => true
LCD.main_display = false
p LCD.main_display
# => false
p LCD.mirror
# => "off"
LCD.mirror = "on"
p LCD.mirror
# => "on"
p LCD.resolution
# => "1440x960"
LCD.resolution = "1280x800"
p LCD.resolution
# => "1280x800"
p LCD.colors
# => "Millions"
LCD.colors = "Thousands"
p LCD.colors
# => "Thousands"
p LCD.brightness
# => 50
LCD.brightness = 75
p LCD.brightness
# => 75
p LCD.auto_adjust
# => true
LCD.auto_adjust = false
p LCD.auto_adjust
# => false
p LCD.class_variables
# ["@@auto_adjust", "@@online", "@@resolution", "@@spices_added", 
#  "@@brightness", "@@mirror", "@@refresh_rate", "@@colors", "@@main_display", 
#  "@@show_in_menu", "@@core_image"]
p LCD.spices_added.sort
# ["auto_adjust", "auto_adjust=", "brightness", "brightness=", "colors", "colors=", 
#  "core_image", "main_display", "main_display=", "mirror", "mirror=", "online", "online=", 
#  "refresh_rate", "refresh_rate=", "resolution", "resolution=", "show_in_menu", "show_in_menu="]
